Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbox2d.common
Class Sweep

    java.lang.Object
      org.jbox2d.common.Sweep

    public class Sweep

extends java.lang.Object

Primarily for internal use.
Describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position.

Field Summary
`float` | `a` World angles
`float` | `a0` World angles
`Vec2` | `c` Center world positions
`Vec2` | `c0` Center world positions
`Vec2` | `localCenter` Local center of mass position
`float` | `t0` Time interval = [t0,1], where t0 is in [0,1]

Constructor Summary
`Sweep()`

Method Summary
`void` | `advance(float t)` Advance the sweep forward, yielding a new initial state.
`void` | `getXForm(XForm xf, float t)` Get the interpolated transform at a specific time.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### localCenter

    public Vec2 localCenter

  Local center of mass position

### c0

    public Vec2 c0

  Center world positions

### c

    public Vec2 c

  Center world positions

### a0

    public float a0

  World angles

### a

    public float a

  World angles

### t0

    public float t0

  Time interval = [t0,1], where t0 is in [0,1]

Constructor Detail

### Sweep

    public Sweep()

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getXForm

    public void getXForm(XForm xf,
                         float t)

  Get the interpolated transform at a specific time.

  Parameters:
    `xf` - the result is placed here - must not be null
    `t` - the normalized time in [0,1].

### advance

    public void advance(float t)

  Advance the sweep forward, yielding a new initial state.

  Parameters:
    `t` - the new initial time.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD